package com.ly.service.search;

/**
 * 作为kafka消息message，既代表index又代表rmove
 * @author ：LY
 * @date ：Created in 2020/11/18 21:27
 * @modified By：
 */
public class HouseIndexMessage {
    public static final int MAX_RETRY = 3;
    public static final String INDEX = "index";
    public static final String REMOVE = "remove";
        private  Long houseId;
        private String operation;
        //防止异常情况下构建不成功
        private int retry = 0;

    /**
     *默认构造器 防止序列化失败
     */
    public HouseIndexMessage() {
    }

    public HouseIndexMessage(Long houseId, String operation, int retry) {
        this.houseId = houseId;
        this.operation = operation;
        this.retry = retry;
    }

    public Long getHouseId() {
        return houseId;
    }

    public void setHouseId(Long houseId) {
        this.houseId = houseId;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public int getRetry() {
        return retry;
    }

    public void setRetry(int retry) {
        this.retry = retry;
    }
}
